<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
Route::group('admin', function(){
    Route::group('order', function(){
        Route::rule('index', 'admin/Order/index');
        Route::rule('read', 'admin/Order/read');
    })->middleware('AdminAuth');
    Route::group('equipment', function(){
        Route::rule('index', 'admin/Equipment/index');
        Route::rule('save', 'admin/Equipment/save');
        Route::rule('read', 'admin/Equipment/read');
        Route::rule('update', 'admin/Equipment/update');
        Route::rule('delete', 'admin/Equipment/delete');
        Route::rule('relation', 'admin/Equipment/relation');
        Route::rule('getVideo', 'admin/Equipment/getVideo');
        Route::rule('getAlarm', 'admin/Equipment/getAlarm');
        Route::rule('untying', 'admin/Equipment/untying');
    })->middleware('AdminAuth');
    Route::group('index', function(){
        Route::rule('index', 'admin/Index/index');
        Route::rule('note_update', 'admin/Index/note_update');
    })->middleware('AdminAuth');
    Route::group('culverts', function(){
        Route::rule('index', 'admin/Culverts/index');
        Route::rule('save', 'admin/Culverts/save');
        Route::rule('read', 'admin/Culverts/read');
        Route::rule('update', 'admin/Culverts/update');
        Route::rule('delete', 'admin/Culverts/delete');
        Route::rule('get_arr', 'admin/Culverts/get_arr');
    })->middleware('AdminAuth');
    Route::group('institution', function(){
        Route::rule('index', 'admin/Institution/index');
        Route::rule('save', 'admin/Institution/save');
        Route::rule('read', 'admin/Institution/read');
        Route::rule('update', 'admin/Institution/update');
        Route::rule('delete', 'admin/Institution/delete');
        Route::rule('get_arr', 'admin/Institution/get_arr');
    })->middleware('AdminAuth');
    Route::group('staff', function(){
        Route::rule('index', 'admin/Staff/index');
        Route::rule('save', 'admin/Staff/save');
        Route::rule('read', 'admin/Staff/read');
        Route::rule('update', 'admin/Staff/update');
        Route::rule('delete', 'admin/Staff/delete');
    })->middleware('AdminAuth');
    Route::group('admin', function(){
        Route::rule('logIn', 'admin/Admin/logIn');
        Route::rule('index', 'admin/Admin/index')->middleware('AdminAuth');
        Route::rule('save', 'admin/Admin/save')->middleware('AdminAuth');
        Route::rule('read', 'admin/Admin/read')->middleware('AdminAuth');
        Route::rule('update', 'admin/Admin/update')->middleware('AdminAuth');
        Route::rule('delete', 'admin/Admin/delete')->middleware('AdminAuth');
        Route::rule('role_store', 'admin/Admin/role_store')->middleware('AdminAuth');
    });
})->allowCrossDomain();


Route::group('web', function(){
    Route::group('index', function(){
        Route::rule('index', 'web/Index/index')->middleware('WebAuth');
        Route::rule('format_time', 'web/Index/format_time')->middleware('WebAuth');
        Route::rule('upload', 'web/Index/upload')->middleware('WebAuth');
    });
    Route::group('order', function(){
        Route::rule('index', 'web/Order/index')->middleware('WebAuth');
        Route::rule('save', 'web/Order/save');
        Route::rule('saveVideo', 'web/Order/saveVideo');
        Route::rule('saveVideoNew', 'web/Order/saveVideoNew');
        Route::rule('read', 'web/Order/read')->middleware('WebAuth');
        Route::rule('edit', 'web/Order/edit')->middleware('WebAuth');
    });
    Route::group('staff', function(){
        Route::rule('logIn', 'web/staff/logIn');
    });
})->allowCrossDomain();



//Route::get('index','index/index/index');Route::group('web', function(){
//    Route::rule('/Order/get', 'web/Order/index');
//});
//Route::group('admin', function(){

